<?php

namespace app\admin\model\shop;

use think\Model;


class ShopPrints extends Model
{


    // 表名
    protected $name = 'shop_prints';
    
    // 自动写入时间戳字段
    protected $autoWriteTimestamp = false;

    // 定义时间戳字段名
    protected $createTime = false;
    protected $updateTime = false;
    protected $deleteTime = false;

    // 追加属性
    protected $append = [

    ];

    public function printInfo($shop_id){
       return self::get(['shop_id'=>$shop_id]);
    }

    public function shop()
    {
        return $this->belongsTo('app\admin\model\Shop', 'shop_id', 'id', [], 'LEFT')->setEagerlyType(0);
    }
}
